package cn.hesion.mergefile.step2;
/**
 * ClassName: CommentReducer <br/>
 * Description: <br/>
 * date: 2021/2/4 11:09<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @program: ClientDemo
 * @description:
 * @author: hesion
 * @create: 2021-02-04 11:09
 **/
public class CommentReducer extends Reducer<CommentBean, NullWritable,CommentBean,NullWritable> {
    @Override
    protected void reduce(CommentBean key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
        for (NullWritable value : values) {
            context.write(key,value);
        }
    }
}
